package za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.ChainOfResponsibility.Factory;

import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.ChainOfResponsibility.Model.EarthHandler;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.ChainOfResponsibility.Model.MercuryHandler;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.ChainOfResponsibility.Model.PlanetHandler;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.ChainOfResponsibility.Model.VenusHandler;

public class ChainFactory
{

    public static PlanetHandler setUpChain() 
    {
        PlanetHandler mercuryHandler = new MercuryHandler();
        PlanetHandler venusHandler = new VenusHandler();
        PlanetHandler earthHandler = new EarthHandler();

        mercuryHandler.setSuccessor(venusHandler);
        venusHandler.setSuccessor(earthHandler);

        return mercuryHandler;
    }

}